home *** CD-ROM | disk | FTP | other *** search
/ Inter.Net 55-1 / Inter.Net 55-1.iso / CBuilder / Setup / BCB / data.z / errno.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-02-09  |  4.6 KB  |  154 lines

  1. /*  errno.h
  2.  
  3.     Defines the system error variable errno and the error
  4.     numbers set by system calls. Errors which exist in Unix(tm)
  5.     but not MSDOS have value -1.
  6.  
  7. */
  8.  
  9. /*
  10.  *      C/C++ Run Time Library - Version 9.0
  11.  *
  12.  *      Copyright (c) 1987, 1998 by Borland International
  13.  *      All Rights Reserved.
  14.  *
  15.  */
  16. /* $Revision:   9.4  $ */
  17.  
  18. #ifndef __ERRNO_H
  19. #define __ERRNO_H
  20.  
  21. #ifndef ___STDDEF_H
  22. #include <_stddef.h>
  23. #endif
  24.  
  25. #ifdef __cplusplus
  26. namespace std {
  27. extern "C" {
  28. #endif /* __cplusplus */
  29.  
  30. #if !defined(RC_INVOKED)
  31.  
  32.  
  33. #if defined(__STDC__)
  34. #pragma warn -nak
  35. #endif
  36.  
  37. #endif  /* !RC_INVOKED */
  38.  
  39.  
  40. /*  Dos Error Codes */
  41.  
  42. #define EZERO    0      /* Error 0                  */
  43. #define EINVFNC  1      /* Invalid function number  */
  44. #define ENOFILE  2      /* File not found           */
  45. #define ENOPATH  3      /* Path not found           */
  46. #define ECONTR   7      /* Memory blocks destroyed  */
  47. #define EINVMEM  9      /* Invalid memory block address */
  48. #define EINVENV 10      /* Invalid environment      */
  49. #define EINVFMT 11      /* Invalid format           */
  50. #define EINVACC 12      /* Invalid access code      */
  51. #define EINVDAT 13      /* Invalid data             */
  52. #define EINVDRV 15      /* Invalid drive specified  */
  53. #define ECURDIR 16      /* Attempt to remove CurDir */
  54. #define ENOTSAM 17      /* Not same device          */
  55. #define ENMFILE 18      /* No more files            */
  56.  
  57. #define ENOENT   2      /* No such file or directory*/
  58. #define EMFILE   4      /* Too many open files      */
  59. #define EACCES   5      /* Permission denied        */
  60. #define EBADF    6      /* Bad file number          */
  61. #define ENOMEM   8      /* Not enough core          */
  62. #define EFAULT  14      /* Unknown error            */
  63. #define ENODEV  15      /* No such device           */
  64. #define EINVAL  19      /* Invalid argument         */
  65. #define E2BIG   20      /* Arg list too long        */
  66. #define ENOEXEC 21      /* Exec format error        */
  67. #define EXDEV   22      /* Cross-device link        */
  68. #define ENFILE  23      /* Too many open files      */
  69. #define ECHILD  24      /* No child process         */
  70. #define ENOTTY  25      /* UNIX - not MSDOS         */
  71. #define ETXTBSY 26      /* UNIX - not MSDOS         */
  72. #define EFBIG   27      /* UNIX - not MSDOS         */
  73. #define ENOSPC  28      /* No space left on device  */
  74. #define ESPIPE  29      /* Illegal seek             */
  75. #define EROFS   30      /* Read-only file system    */
  76. #define EMLINK  31      /* UNIX - not MSDOS         */
  77. #define EPIPE   32      /* Broken pipe              */
  78. #define EDOM    33      /* Math argument            */
  79. #define ERANGE  34      /* Result too large         */
  80. #define EEXIST  35      /* File already exists      */
  81. #define EDEADLOCK 36    /* Locking violation        */
  82. #define EPERM   37      /* Operation not permitted  */
  83. #define ESRCH   38      /* UNIX - not MSDOS         */
  84. #define EINTR   39      /* Interrupted function call */
  85. #define EIO     40      /* Input/output error       */
  86. #define ENXIO   41      /* No such device or address */
  87. #define EAGAIN  42      /* Resource temporarily unavailable */
  88. #define ENOTBLK 43      /* UNIX - not MSDOS         */
  89. #define EBUSY   44      /* Resource busy            */
  90. #define ENOTDIR 45      /* UNIX - not MSDOS         */
  91. #define EISDIR  46      /* UNIX - not MSDOS         */
  92. #define EUCLEAN 47      /* UNIX - not MSDOS         */
  93.  
  94. #if !defined(__STDC__)
  95. #define sys_nerr     _sys_nerr
  96. #define sys_errlist  _sys_errlist
  97. #endif
  98.  
  99. /*  Dos Error Codes */
  100.  
  101. #define ENAMETOOLONG 48 /* Filename too long        */
  102.  
  103. #ifdef _MT
  104.  
  105. #ifdef __cplusplus
  106. extern "C" {
  107. #endif
  108. extern  int * _RTLENTRY _EXPFUNC __errno(void);
  109. extern  int * _RTLENTRY _EXPFUNC __doserrno(void);
  110. #ifdef  __cplusplus
  111. }
  112. #endif
  113. #define errno (*__errno())
  114. #define _doserrno (*__doserrno())
  115.  
  116. #else
  117.  
  118. extern  int _RTLENTRY  _EXPDATA errno;
  119. extern  int _RTLENTRY  _EXPDATA _doserrno;
  120.  
  121. #endif
  122.  
  123. extern  int   _RTLENTRY _EXPDATA _sys_nerr;
  124. extern char * _RTLENTRY _EXPDATA _sys_errlist[];
  125.  
  126. #if !defined(RC_INVOKED)
  127.  
  128. #if defined(__STDC__)
  129. #pragma warn .nak
  130. #endif
  131.  
  132.  
  133. #endif  /* !RC_INVOKED */
  134.  
  135. #ifdef __cplusplus
  136. } // "C"
  137. } // std
  138. #endif /* __cplusplus */
  139.  
  140. #endif  /* __ERRNO_H  */
  141.  
  142. #if defined(__cplusplus) && !defined(__USING_CNAME__) && !defined(__ERRNO_H_USING_LIST)
  143. #define __ERRNO_H_USING_LIST
  144. #    ifdef _MT
  145.        using std:: __errno;
  146.        using std:: __doserrno;
  147. #    else // !_MT
  148.        using std::errno;
  149.        using std::_doserrno;
  150. #    endif // _MT
  151.      using std::_sys_nerr;
  152.      using std::_sys_errlist;
  153. #endif /* __USING_CNAME__ */
  154.